package org.example.spring_frist.LibraryProject.dao;

import org.example.spring_frist.LibraryProject.model.loginInfo;
import org.example.spring_frist.LibraryProject.mapper.loginMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

//储存密码
@Repository
public class booksAccountDao {

    /**
     * 获取密码
     */
    @Autowired
    private loginMapper loginMapper;

    public List<loginInfo> getLoginInfo() {
        return loginMapper.selectLoginInfo();
    }

    public boolean register(loginInfo loginInfo) {
        return loginMapper.insertLoginInfo(loginInfo) != 0;
    }

}
